package com.example.demo.hotel.service;

import com.example.demo.hotel.entity.Order;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.time.LocalDate;
import java.util.List;
import java.util.Optional;

public interface OrderService {
    Order saveOrder(Order order);
    Optional<Order> getOrderById(Long id);
    Order getOrderByOrderNo(String orderNo); // 添加根据订单号查询
    Page<Order> getAllOrders(Pageable pageable); // 添加分页支持
    List<Order> getOrdersByRoomNumber(String roomNumber);
    List<Order> getOrdersByDateRange(LocalDate startDate, LocalDate endDate); // 修改参数类型
    List<Order> getOrdersByStatus(String status);
    Page<Order> searchOrders(String keyword, Pageable pageable); // 添加搜索方法
    Order updateOrder(Long id, Order orderDetails);
    void deleteOrder(Long id);
}